
import cv2
import numpy as np


picture = cv2.imread("/home/ljn/ljn/AI2021_ws/src/hw-myymmm/vision_tracker/picture/02.png")
height = picture.shape[0]
width = picture.shape[1]

binary = np.zeros((height,width))
print(binary.shape)
for i in range(height):
    for j in range(width):
        if(picture[i][j][1]>50):
            binary[i][j] = 0
        else:
            binary[i][j] = 255

cv2.imwrite("/home/ljn/ljn/AI2021_ws/src/hw-myymmm/vision_tracker/picture/map.png",binary)
